{% extends 'ShopAdminBundle::base.html.twig'%}

{% if edit_form is defined %}
    {% set form=edit_form %}
{% endif %}

{% set form_name=form.vars.name %}
{% set method= form.vars.method %}
{% set action= form.vars.action %}

{% block def_param %}

{% endblock %}

{% block main_content %}
    <div class="box box-info col-md-8 form_wrap">
        <form name="{{ form_name }}" method="{{ method }}"
              action="{{ action }}" class="form-horizontal"
              enctype="multipart/form-data">

            <div class="box-body">

            {% block form_groups %}
            {% endblock %}

        <div>
            {{ form_widget(form._token) }}

            <div class="row box-foot">
                {% if ajax_form is defined %}
                <button type="button" class="btn btn-success" id="btn_submit_form">确认</button>
                {% else %}
                <button type="submit" class="btn btn-success" id="btn_submit_form">确认</button>
                {% endif %}
            </div>

        </form>
    </div>

{% endblock %}